Stable Minimum Storage Merging by Symmetric Comparisons
نویسندگان
چکیده
We introduce a new stable minimum storage algorithm for merging that needs O(m log( n m +1)) element comparisons, where m and n are the sizes of the input sequences with m ≤ n. According to the lower bound for merging, our algorithm is asymptotically optimal regarding the number of comparisons. The presented algorithm rearranges the elements to be merged by rotations, where the areas to be rotated are determined by a simple principle of symmetric comparisons. This style of minimum storage merging is novel and looks promising. Our algorithm has a short and transparent definition. Experimental work has shown that it is very efficient and so might be of high practical interest.
منابع مشابه
A Simple Algorithm for Stable Minimum Storage Merging
We contribute to the research on stable minimum storage merging by introducing an algorithm that is particularly simply structured compared to its competitors. The presented algorithm performs O(m log( n m + 1)) comparisons and O((m + n) log m) assignments, where m and n are the sizes of the input sequences with m ≤ n. Hence, according to the lower bounds of merging the algorithm is asymptotica...
متن کاملOn Optimal and Efficient in Place Merging
We introduce a new stable in place merging algorithm that needs O(m log( n m +1)) comparisons and O(m+n) assignments. According to the lower bounds for merging our algorithm is asymptotically optimal regarding the number of comparisons as well as assignments. The stable algorithm is developed in a modular style out of an unstable kernel for which we give a definition in pseudocode. The literatu...
متن کاملIn situ, Stable Merging by Way of the Perfect Shuffle
We introduce a novel approach to the classical problem of in-situ, stable merging, where \in-situ" means the use of no more than O(log 2 n) bits of extra memory for lists of size n. Shuuemerge reduces the merging problem to the problem of realising the \perfect shuue" permutation, that is, the exact interleaving of two, equal length lists. The algorithm is recursive, using a logarithmic number ...
متن کاملA Simple Algorithm for Merging Two Disjoint Linearly-Ordered Sets
In this paper we present a new algorithm for merging two linearly ordered sets which requires substantially fewer comparisons than the commonly used tape merge or binary insertion algorithms. Bounds on the difference between the number of comparisons required by this algorithm and the information theory lower bounds are derived. Results from a computer implementation of the new algorithm are gi...
متن کاملOptimal Stable Merging
This paper shows how to stably merge two sequences A and B of sizes m and n, m n, respectively, with O m n assignments, O m log n=m 1 comparisons and using only a constant amount of additional space. This result matches all known lower bounds and closes an open problem posed by Dudzinski and Dydek in 1981. Our algorithm is based on the unstable algorithm of Mannila and Ukkonen. All techn...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2004